package com.xaicode.locker.JavaSJMS.three.StructureMode.Proxy;

/**
 * 代理
 * @author Locker
 * 	  <br> 2017年5月2日 下午12:20:43
 * @version v1.0
 */
public class Proxy implements Sourceable {

	private Sourceable sourceable;
	
	public Proxy(){
		super();
		this.sourceable = new Source();
	}
	
	public void method() {
		this.before();
		sourceable.method();
		this.after();
	}
	
	private void before(){
		System.out.println("-- before proxy!");
	}
	
	private void after(){
		System.out.println("-- after proxy!");
	}

}
